﻿using FreeSql.DataAnnotations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KJSyncXP.Sqlite.ViewModels
{
    [Table(Name = "v_userpermissions", DisableSyncStructure = true)] // 关键：禁用表结构同步
    public class VUserpermission
    {
        /// <summary>
        /// 用户UUID
        /// 来自[user]表的useruuid字段
        /// </summary>
        [Column(Name = "useruuid")]
        public string Useruuid { get; set; }

        /// <summary>
        /// 用户名
        /// 来自[user]表的username字段
        /// </summary>
        [Column(Name = "username")]
        public string Username { get; set; }

        /// <summary>
        /// 权限名称
        /// 来自permission表的pname字段
        /// </summary>
        [Column(Name = "pname")]
        public string Pname { get; set; }

        /// <summary>
        /// 权限键
        /// 来自permission表的pkey字段
        /// </summary>
        [Column(Name = "pkey")]
        public string Pkey { get; set; }

        /// <summary>
        /// 权限级别
        /// 来自permission表的plevel字段
        /// </summary>
        [Column(Name = "plevel")]
        public int? Plevel { get; set; }

        /// <summary>
        /// 权限类型
        /// 来自permission表的ptype字段
        /// </summary>
        [Column(Name = "ptype")]
        public int? Ptype { get; set; }

        /// <summary>
        /// 权限UUID
        /// 来自permission表的puuid字段
        /// </summary>
        [Column(Name = "puuid")]
        public string Puuid { get; set; }
    }
}
